<?php


//转成成中文数字
function number2Chinese_number($number) {

    $chineseNumArr = array('零', '一', '二', '三', '四', '五', '六', '七', '八', '九');
    $chineseUnitArr = array('', '十', '百', '千', '万', '亿');

    if ($number == 0) {
        return $chineseNumArr[0];
    }

    $chineseStr = '';
    $pos = 0;
    while ($number > 0) {
        $digit = $number % 10;
        if ($digit == 0) {
            if ($pos == 0 || $pos == 4 || $pos == 8) {
                $chineseStr = $chineseUnitArr[$pos] . $chineseStr;
            }
        } else {
            $chineseStr = $chineseNumArr[$digit] . $chineseUnitArr[$pos] . $chineseStr;
        }
        $number = floor($number / 10);
        $pos++;
    }

    return $chineseStr;
}


?>